"""Helper functions

Consists of functions to typically be used within templates, but also
available to Controllers. This module is available to both as 'h'.
"""
# Import helpers as desired, or define your own, ie:
# from webhelpers.html.tags import checkbox, password

from routes import url_for
from webhelpers.html.tags import stylesheet_link, javascript_link
from webhelpers import paginate
from formbuild.helpers import field
from formbuild import start_with_layout as form_start, end_with_layout as form_end
from webhelpers.html.tags import text, textarea, select, submit, password, hidden, image
from webhelpers.html.tags import link_to
from webhelpers.html.tools import button_to

def first100(txt):
    if len(txt) > 100:
        return txt[:100]
    else:
        return txt
